This invention relates to a method and system for an auto-tuning of a controller. More particularly, the present invention relates to a method and system by which a controller of a motor control system is automatically tuned using a built-in auto-tuning system.
A control system (e.g., motor control system) generally includes a controller and a system to be controlled which is connected to the controller through a feedback loop. In operation, the system is controlled by the output of the controller and the system output is fed back via a feedback path where it is subtracted from a reference input to form an error signal. This error signal is processed by the controller to generate a modified control input to the system. The controller often needs tuning because of changes in characteristic properties such as motor/load inertia, resonance due to a compliance, backlash and friction etc.
A controller usually includes filters or compensators. A compensator is a filter that is designed to provide a specific gain and phase shift to the controlled system, usually at a specific frequency. PID (Proportionalxe2x80x94Integralxe2x80x94Derivative) type compensators are widely used because of their general purpose design. As used herein, the term a PID type compensator encompasses all variations and combinations of the compensation functions of the PID compensator, including P, PI and PD configurations. A PID type compensator is so named because its control output is derived from a weighted sum of the input, the integral of the input, and the derivative of the input. The PID type compensator controls in a proportional control mode, integral control mode, and differential control mode simultaneously so that the system reaches a target value in a stable state within as fast a period of time as is possible. Such compensators include a proportional amplification unit with a proportional gain parameter Kp, an integration unit with an integration gain parameter KI, and a derivative unit with a derivative gain parameter KD.
Tuning a controller is the process of setting or adjusting the compensator gains (e.g., KP, KI, KD) of the controller to achieve desired performance. For example, since the stability of a motion controller may vary due to the interaction with load condition, compensator gains of the controller must be tuned (i.e., adjusted) regularly to operate effectively in a specific application of the controller. Controllers that are poorly tuned either act too aggressively or too sluggishly. When the uncertainty in the disturbance or process dynamic characteristics are large, the tuning of a controller is often difficult. As a result, the tuning process in the past has usually required a highly experienced technician who tuned the system manually. However, while manual tuning of a controller is possible, it is often tedious and inaccurate, especially when characteristics of the controlled process change over time. In addition, process non-linearity of the controller makes it difficult to manually bring the system into controlled operation.
Auto-tuning is a process in which the compensator gains of a control system are automatically adjusted so that the tuning process does not require an engineer or a highly experienced technician. Many techniques have recently been proposed for the auto-tuning of controllers, such as relay feedback, pattern recognition techniques, and correlation techniques. Such auto-tuning techniques are, however, not cost-effective and time-efficient when used in a practical control system.
A Dynamic Signal Analyzer (DSA) is commonly used to perform a frequency response analysis which can provide a frequency domain tuning. The DSA generates a multi-frequency signal which can be injected into the control system as a command. The response to the injected signal is returned to the DSA and analyzed usually employing a Bode-Plot. A DSA unit, however, is relatively expensive, often costing several times more than the controller. Moreover, the number of points available to the DSA for injecting test signals is often fewer than desired. As a result, the use of such equipment is usually limited to the research laboratory where internal access can be obtained and is not generally available at the customer site.
The above-identified problems are solved and a technical advance is achieved in the art by providing a method and system that perform an auto-tuning of a motor based on a frequency response function.
Instability occurs when the loop gain of a control system is 0 dB (i.e., unity gain or greater) and phase is xe2x88x92180xc2x0 or more (i.e., positive feedback). In the frequency response function of the control system, the gain crossover frequency (i.e., a frequency of the 0 dB crossing) and the phase crossover frequency (i.e., a frequency of xe2x88x92180xc2x0 crossing) are determined. A phase margin (PM) is the difference in the phase value at tile gain crossover frequency and xe2x88x92180xc2x0. A gain margin (GM) is the difference in the gain value at the phase crossover frequency and 0 dB. The gain and phase crossover frequencies are the boundaries of the stable region. The gain and phase margins indicate a safe operating range within the boundaries.
In accordance with an aspect of the invention, there is provided a built-in auto-tuning method and system of a motor control system in which a random noise signal is internally generated and applied to the motor control system along with normal control commands. The random noise signal is frequency rich signal including a wide range of operating frequencies. By using the frequency rich random noise signal, a simultaneous uniform excitation of the whole frequency range is achieved in a single run usually taking less than one second. Frequency response data (e.g., gains and phases) for the random noise test signals are received. The received data reflect responses of the motor control system at a wide range of frequencies injected through the random noise signal and are enough to generate a frequency model of an open-loop system. The gain and phase margins of the control system are calculated at the respective crossover frequencies. The calculated gain and phase margins are compared with a set of predetermined gain and phase margins which are desirable to the operation of the motor control system in a particular application. If the calculated gain and phase margins are outside the preferred range, the built-in auto-tuning method and system adjust the initial controller parameters during a normal operation and repeats the auto-tuning sequence to bring the gain and phase margins within the preferred range. By trial and error, the controller parameters are automatically adjusted until a suitable gain and phase margins are found for the particular applications.
The response data can be displayed external to the controller by generating an open-loop Bode plot using a least square fit criteria.
Other and further aspects of the present invention will become apparent during the course of the following detailed description and by reference to the attached drawings.